package com.ahoi.service;

import com.ahoi.dao.BookInfoDao;
import com.ahoi.dao.DownUrlDao;
import com.ahoi.model.BookInfo;
import com.ahoi.model.DownUrl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: ahoi
 * @Date: 2018/4/28 17:19
 * @Description: 下载地址
 */
@Service
public class DownUrlService {

    @Autowired
    private DownUrlDao downUrlDao;

    /**
     * 验证是否存在该数据
     */
    public boolean checkExists(DownUrl model) {
        return downUrlDao.checkExists(model) > 0;
    }

    /**
     * 插入
     */
    public void insertOne(DownUrl model) {
        downUrlDao.insertOne(model);
    }

    /**
     * 更新
     */
    public void updateOne(DownUrl model) {
        downUrlDao.updateOne(model);
    }

}
